implementation
uses ComObj;
{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
var
  WordApp,ExcelApp:OleVariant;

begin
   WordApp:=CreateOleObject('Word.Application');
   WordApp:=WordApp.Application;
   WordApp.Documents.Add;
   WordApp.Selection.Text:='Hello MS Word';
   WordApp.Visible:=True;
   ShowMessage('New document in Word');

   ExcelApp:=CreateOleObject('Excel.Application');
   ExcelApp:=ExcelApp.Application;
   ExcelApp.Visible:=True;
   ExcelApp.Workbooks.Add;
   ExcelApp.Range['A1'].Select;
   ExcelApp.ActiveCell.FormulaR1C1:= '10';
   ExcelApp.Range['B1'].Select;
   ExcelApp.ActiveCell.FormulaR1C1:='3';
   ExcelApp.Range['C1'].Select;
   ExcelApp.ActiveCell.FormulaR1C1:= '=RC[-2]+RC[-1]';

   ShowMessage('Excel Result:'
                                    +ExcelApp.Cells[1,3].Value);

end;
